package cool.taomu.box.git

import javax.inject.Provider
import org.eclipse.jgit.transport.CredentialsProvider
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider
import javax.inject.Inject
import javax.inject.Named

class UPCredentialsProvider implements Provider<CredentialsProvider>{

	@Inject
	@Named("git.username")
	String username	

	@Inject
	@Named("git.pass")
	String password;
	
	override get() {
		return new UsernamePasswordCredentialsProvider(username, password)
	}
	
}